QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Vectors

QuickDraw 3D defines two- and three-dimensional vectors in the usual way, as pairs and triples of floating-point numbers. Vectors are defined by data types distinct from those that define points primarily for conceptual clarity and for enforcing the correct usage of vectors in mathematical routines. Vectors are defined by the TQ3Vector2D and TQ3Vector3D data types.

typedef struct TQ3Vector2D {
    float           x;
    float           y;
} TQ3Vector2D;
typedef struct TQ3Vector3D {
    float           x;
    float           y;
    float           z;
} TQ3Vector3D;
x
The x scalar component of a vector.
y
The y scalar component of a vector.
z
The z scalar component of a vector.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |